<?php

	session_start();

	require_once("appconf.php");
	require_once("output_includes.php");

	if(!isset($_SESSION['username'])) {
		header("HTTP/1.1 401 Unauthorized");
		die();
	}


	header("Content-Type: text/xml");
	echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";


	echo "<response>\n";

	$outputs = Registry::getByRealm("output");
	for ($i=0; $i<sizeof($outputs); $i++) {
		echo "\t<output title=\"".$outputs[$i]->getTitle()."\" />\n";
	}

	echo "</response>\n";

?>